﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;


namespace OperGui.Models
{ 
    public class DataConverter : IValueConverter
    {
        public double TwoLine;
        public double MRD1;
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            double Value;

            switch ((string)parameter)
            {
                case "1":
                    Value = (double)value / 2 - 50;
                    break;
                case "2":
                    Value = (double)value / 10;
                    break;

                case "3":
                default:
                    Value = (double)value/10*7.5;
                    break;

               
                    
            }

            return Value;

          
            
           
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
    }

}
